package com.tmy.entity;

import com.alibaba.fastjson2.JSONArray;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import lombok.Data;


import java.io.Serializable;
import java.util.List;


@Data
@TableName(value = "hotel",autoResultMap = true)
public class Hotel implements Serializable {
    private static final long serialVersionUID = 1L;
    @TableId(type = IdType.AUTO)
    private Integer id;
    private String name;
    private String address;
    private String avatar;
    private String location;
    private String description;
    private double price;//价格
    @TableField(typeHandler = FastjsonTypeHandler.class)
    private JSONArray describeList;
    @TableField(typeHandler = FastjsonTypeHandler.class)
    private JSONArray imageList;
    @TableField(typeHandler = FastjsonTypeHandler.class)
    private JSONArray introduce;
    @TableField(exist = false)
    private List<RoomInfo> roomList;
}